<?php

namespace MessageMap\Config;

class DdConf
{
    private $rabbit = [
        'host'     => '',
        'port'     => '',
        'username' => '',
        'password' => '',
    ];

    private $redis = [
        'host'     => '',
        'port'     => '',
        'password' => ''
    ];

    /**
     * @return array
     */
    public function getRabbit(): array
    {
        return $this->rabbit;
    }

    /**
     * @param $host
     * @param $port
     * @param $username
     * @param $password
     */
    public function setRabbit($host, $port, $username, $password)
    {
        $this->rabbit['host']     = $host;
        $this->rabbit['port']     = $port;
        $this->rabbit['username'] = $username;
        $this->rabbit['password'] = $password;
    }

    /**
     * @return array
     */
    public function getRedis(): array
    {
        return $this->redis;
    }

    /**
     * @param $host
     * @param $port
     * @param $password
     */
    public function setRedis($host, $port, $password)
    {
        $this->redis['host']     = $host;
        $this->redis['port']     = $port;
        $this->redis['password'] = $password;
    }
}
